<?php

namespace app\common\model\car;

use app\admin\model\usedcar\Car;
use app\common\model\User;
use think\Cache;
use think\Model;

/**
 * 点赞表
 */
class CarNews可用Model extends Model
{

    // 表名
    protected $name = 'car_news_praise';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = '';
    // 追加属性
    protected $append = [
    ];
    public function user(){
        return $this->hasOne(User::class,'id','user_id')->field('id,avatar');
    }
}
